+2001-12-13 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * demos/testpixbuf-drawable.c, demos/testpixbuf-save.c,
+ demos/testpixbuf-scale.c, demos/testpixbuf.c: Call g_object_ref
+ and g_object_unref instead of gdk_pixbuf_ref and gdk_pixbuf_unref
+ resp.
+
Thu Dec 13 22:02:41 2001 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (validate_visible_area): free path
+2001-12-13 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * demos/testpixbuf-drawable.c, demos/testpixbuf-save.c,
+ demos/testpixbuf-scale.c, demos/testpixbuf.c: Call g_object_ref
+ and g_object_unref instead of gdk_pixbuf_ref and gdk_pixbuf_unref
+ resp.
+
Thu Dec 13 22:02:41 2001 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (validate_visible_area): free path
+2001-12-13 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * demos/testpixbuf-drawable.c, demos/testpixbuf-save.c,
+ demos/testpixbuf-scale.c, demos/testpixbuf.c: Call g_object_ref
+ and g_object_unref instead of gdk_pixbuf_ref and gdk_pixbuf_unref
+ resp.
+
Thu Dec 13 22:02:41 2001 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (validate_visible_area): free path
+2001-12-13 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * demos/testpixbuf-drawable.c, demos/testpixbuf-save.c,
+ demos/testpixbuf-scale.c, demos/testpixbuf.c: Call g_object_ref
+ and g_object_unref instead of gdk_pixbuf_ref and gdk_pixbuf_unref
+ resp.
+
Thu Dec 13 22:02:41 2001 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (validate_visible_area): free path
+2001-12-13 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * demos/testpixbuf-drawable.c, demos/testpixbuf-save.c,
+ demos/testpixbuf-scale.c, demos/testpixbuf.c: Call g_object_ref
+ and g_object_unref instead of gdk_pixbuf_ref and gdk_pixbuf_unref
+ resp.
+
Thu Dec 13 22:02:41 2001 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (validate_visible_area): free path
+2001-12-13 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * demos/testpixbuf-drawable.c, demos/testpixbuf-save.c,
+ demos/testpixbuf-scale.c, demos/testpixbuf.c: Call g_object_ref
+ and g_object_unref instead of gdk_pixbuf_ref and gdk_pixbuf_unref
+ resp.
+
Thu Dec 13 22:02:41 2001 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (validate_visible_area): free path
+2001-12-13 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * demos/testpixbuf-drawable.c, demos/testpixbuf-save.c,
+ demos/testpixbuf-scale.c, demos/testpixbuf.c: Call g_object_ref
+ and g_object_unref instead of gdk_pixbuf_ref and gdk_pixbuf_unref
+ resp.
+
Thu Dec 13 22:02:41 2001 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (validate_visible_area): free path
new_pixbuf = gdk_pixbuf_get_from_drawable (NULL, root, NULL,
0, 0, 0, 0, evt->width, evt->height);
g_object_set_data (G_OBJECT (drawing_area), "pixbuf", new_pixbuf);
- gdk_pixbuf_unref (pixbuf);
+ g_object_unref (pixbuf);
}
return FALSE;
new_pixbuf = gdk_pixbuf_get_from_drawable (NULL, root, NULL,
0, 0, 0, 0, evt->width, evt->height);
g_object_set_data (G_OBJECT (drawing_area), "pixbuf", new_pixbuf);
- gdk_pixbuf_unref (pixbuf);
+ g_object_unref (pixbuf);
}
return FALSE;
event->area.width, event->area.height,
GDK_RGB_DITHER_NORMAL, event->area.x, event->area.y);
- gdk_pixbuf_unref (dest);
+ g_object_unref (dest);
return TRUE;
}
pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
g_assert (pixbuf != NULL);
- gdk_pixbuf_ref (pixbuf); /* for the RGB window */
+ g_object_ref (pixbuf); /* for the RGB window */
*retloc = new_testrgb_window (pixbuf, "Progressive");
+2001-12-13 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * gdk-pixbuf-animation.c, gdk-pixbuf-loader.c, gdk-pixpuf.c,
+ io-gif-animation.c, io-gif.c, io-tiff.c, test-loaders.c: Remove
+ assorted G_OBJECT casts where unnecessary.
+
+ * gdk-pixbuf-loader.c: Call g_object_ref and g_object_unref
+ instead of gdk_pixbuf_animation_ref and gdk_pixbuf_animation_unref
+ resp.
+
+ * gdk-pixbuf-csource.c, io-bmp.c, io-gif-animation.c, io-ico.c,
+ io-jpeg.c, io-png.c, io-pnm.c, io-ras.c, io-tga.c, io-wbmp.c,
+ io-xbm.c, io-xpm.c, test-gdk-pixbuf.c: Dito for gdk_pixbuf_ref and
+ gdk_pixbuf_unref.
+
+ * Makefile.am, pixops/Makefile.am: Compile everything with
+ -DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED
+
+ * gdk-pixdata.c: Use g_ascii_strup() instead of g_strup().
+
+ * io-xpm.c: Use g_ascii_strcasecmp() instead of g_strcasecmp().
+
2001-12-12 Matthias Clasen <matthiasc@poet.de>
* gdk-pixbuf-io.c: Markup fixes.
-I$(top_srcdir)/gdk-pixbuf \
-I$(top_builddir)/gdk-pixbuf \
-DGTK_VERSION=\"@GTK_VERSION@\" \
+ -DG_DISABLE_DEPRECATED \
+ -DGDK_PIXBUF_DISABLE_DEPRECATED \
@INCLUDED_LOADER_DEFINE@ \
@GTK_DEBUG_FLAGS@ \
@GDK_PIXBUF_DEP_CFLAGS@ \
animation = gdk_pixbuf_non_anim_new (pixbuf);
- g_object_unref (G_OBJECT (pixbuf));
+ g_object_unref (pixbuf);
} else {
fseek (f, 0, SEEK_SET);
animation = (* image_module->load_animation) (f, error);
GdkPixbufNonAnim *non_anim = GDK_PIXBUF_NON_ANIM (object);
if (non_anim->pixbuf)
- g_object_unref (G_OBJECT (non_anim->pixbuf));
+ g_object_unref (non_anim->pixbuf);
G_OBJECT_CLASS (non_parent_class)->finalize (object);
}
non_anim->pixbuf = pixbuf;
if (pixbuf)
- g_object_ref (G_OBJECT (pixbuf));
+ g_object_ref (pixbuf);
return GDK_PIXBUF_ANIMATION (non_anim);
}
iter->non_anim = GDK_PIXBUF_NON_ANIM (anim);
- g_object_ref (G_OBJECT (iter->non_anim));
+ g_object_ref (iter->non_anim);
return GDK_PIXBUF_ANIMATION_ITER (iter);
}
{
GdkPixbufNonAnimIter *iter = GDK_PIXBUF_NON_ANIM_ITER (object);
- g_object_unref (G_OBJECT (iter->non_anim));
+ g_object_unref (iter->non_anim);
G_OBJECT_CLASS (non_iter_parent_class)->finalize (object);
}
}
print_csource (stdout, pixbuf);
- gdk_pixbuf_unref (pixbuf);
+ g_object_unref (pixbuf);
}
else /* parse name, file pairs */
{
return 1;
}
print_csource (stdout, pixbuf);
- gdk_pixbuf_unref (pixbuf);
+ g_object_unref (pixbuf);
p++;
}
toggle = !toggle;
g_warning ("GdkPixbufLoader finalized without calling gdk_pixbuf_loader_close() - this is not allowed. You must explicitly end the data stream to the loader before dropping the last reference.");
if (priv->animation)
- gdk_pixbuf_animation_unref (priv->animation);
+ g_object_unref (priv->animation);
g_free (priv);
priv = GDK_PIXBUF_LOADER (loader)->priv;
if (anim)
- g_object_ref (G_OBJECT (anim));
+ g_object_ref (anim);
else
anim = gdk_pixbuf_non_anim_new (pixbuf);
priv->animation = anim;
- g_signal_emit (G_OBJECT (loader), pixbuf_loader_signals[AREA_PREPARED], 0);
+ g_signal_emit (loader, pixbuf_loader_signals[AREA_PREPARED], 0);
}
static void
priv = GDK_PIXBUF_LOADER (loader)->priv;
- g_signal_emit (G_OBJECT (loader),
+ g_signal_emit (loader,
pixbuf_loader_signals[AREA_UPDATED],
0,
x, y,
if (tmp != NULL)
{
g_propagate_error (error, tmp);
- g_object_unref (G_OBJECT (retval));
+ g_object_unref (retval);
return NULL;
}
priv->closed = TRUE;
- g_signal_emit (G_OBJECT (loader), pixbuf_loader_signals[CLOSED], 0);
+ g_signal_emit (loader, pixbuf_loader_signals[CLOSED], 0);
return retval;
}
G_OBJECT_CLASS (parent_class)->finalize (object);
}
+\f
/**
* gdk_pixbuf_ref:
NULL, NULL);
/* Keep a reference to src_pixbuf */
- g_object_ref (G_OBJECT (src_pixbuf));
+ g_object_ref (src_pixbuf);
g_object_set_qdata_full (G_OBJECT (sub),
g_quark_from_static_string ("gdk-pixbuf-subpixbuf-src"),
height = pixdata->height;
rowstride = pixdata->rowstride;
rle_encoded = (pixdata->pixdata_type & GDK_PIXDATA_ENCODING_RLE) > 0;
- macro_name = g_strdup (name);
- g_strup (macro_name);
+ macro_name = g_ascii_strup (name, -1);
cdata.dump_macros = (dump_type & GDK_PIXDATA_DUMP_MACROS) > 0;
cdata.dump_struct = (dump_type & GDK_PIXDATA_DUMP_PIXDATA_STRUCT) > 0;
}
if (State->pixbuf != NULL)
- gdk_pixbuf_ref(State->pixbuf);
+ g_object_ref(State->pixbuf);
pb = State->pixbuf;
g_free(context->Colormap);
if (context->pixbuf)
- gdk_pixbuf_unref(context->pixbuf);
+ g_object_unref(context->pixbuf);
g_free(context->buff);
g_free(context);
for (l = gif_anim->frames; l; l = l->next) {
frame = l->data;
- gdk_pixbuf_unref (frame->pixbuf);
+ g_object_unref (frame->pixbuf);
if (frame->composited)
- gdk_pixbuf_unref (frame->composited);
+ g_object_unref (frame->composited);
if (frame->revert)
- gdk_pixbuf_unref (frame->revert);
+ g_object_unref (frame->revert);
g_free (frame);
}
iter->gif_anim = GDK_PIXBUF_GIF_ANIM (anim);
- g_object_ref (G_OBJECT (iter->gif_anim));
+ g_object_ref (iter->gif_anim);
iter_restart (iter);
iter_clear (iter);
- g_object_unref (G_OBJECT (iter->gif_anim));
+ g_object_unref (iter->gif_anim);
G_OBJECT_CLASS (iter_parent_class)->finalize (object);
}
if (f->need_recomposite) {
if (f->composited) {
- g_object_unref (G_OBJECT (f->composited));
+ g_object_unref (f->composited);
f->composited = NULL;
}
}
if (f->need_recomposite) {
if (f->composited) {
- g_object_unref (G_OBJECT (f->composited));
+ g_object_unref (f->composited);
f->composited = NULL;
}
}
(gif_anim->bg_blue << 8) |
prev_frame->bg_transparent ? 0 : 255);
- g_object_unref (G_OBJECT (area));
+ g_object_unref (area);
} else if (prev_frame->action == GDK_PIXBUF_FRAME_REVERT) {
f->composited = gdk_pixbuf_copy (prev_frame->composited);
f->revert = gdk_pixbuf_copy (area);
- g_object_unref (G_OBJECT (area));
+ g_object_unref (area);
}
/* Put current frame onto f->composited */
pixbuf = gdk_pixbuf_animation_get_static_image (GDK_PIXBUF_ANIMATION (context->animation));
if (pixbuf)
- g_object_ref (G_OBJECT (pixbuf));
+ g_object_ref (pixbuf);
- g_object_unref (G_OBJECT (context->animation));
+ g_object_unref (context->animation);
g_free (context->buf);
g_free (context);
retval = FALSE;
}
- g_object_unref (G_OBJECT (context->animation));
+ g_object_unref (context->animation);
g_free (context->buf);
g_free (context);
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
_("GIF file was missing some data (perhaps it was truncated somehow?)"));
- g_object_unref (G_OBJECT (context->animation));
+ g_object_unref (context->animation);
context->animation = NULL;
}
g_free (context->HeaderBuf);
if (context->pixbuf)
- gdk_pixbuf_unref (context->pixbuf);
+ g_object_unref (context->pixbuf);
g_free (context);
}
}
}
if (State->pixbuf != NULL)
- gdk_pixbuf_ref (State->pixbuf);
+ g_object_ref (State->pixbuf);
else {
g_set_error (error,
GDK_PIXBUF_ERROR,
*/
if (context->pixbuf)
- gdk_pixbuf_unref (context->pixbuf);
+ g_object_unref (context->pixbuf);
/* if we have an error? */
if (sigsetjmp (context->jerr.setjmp_buffer, 1)) {
*/
if (lc->pixbuf)
- gdk_pixbuf_unref (lc->pixbuf);
+ g_object_unref (lc->pixbuf);
png_destroy_read_struct(&lc->png_read_ptr, NULL, NULL);
g_free(lc);
if (nbytes == 0) {
/* we ran out of data? */
if (context.pixbuf)
- gdk_pixbuf_unref (context.pixbuf);
+ g_object_unref (context.pixbuf);
g_set_error (error,
GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
break;
} else if (retval == PNM_FATAL_ERR) {
if (context.pixbuf)
- gdk_pixbuf_unref (context.pixbuf);
+ g_object_unref (context.pixbuf);
return NULL;
}
g_return_val_if_fail (context != NULL, TRUE);
if (context->pixbuf)
- gdk_pixbuf_unref (context->pixbuf);
+ g_object_unref (context->pixbuf);
#if 0
/* We should ignore trailing newlines and we can't
break;
} else if (retval == PNM_FATAL_ERR) {
if (context->pixbuf)
- gdk_pixbuf_unref (context->pixbuf);
+ g_object_unref (context->pixbuf);
return FALSE;
} else if (retval == PNM_OK) {
/* send updated signal */
}
g_free(membuf);
if (State->pixbuf != NULL)
- gdk_pixbuf_ref(State->pixbuf);
+ g_object_ref(State->pixbuf);
pb = State->pixbuf;
g_free(context->HeaderBuf);
if (context->pixbuf)
- gdk_pixbuf_unref(context->pixbuf);
+ g_object_unref(context->pixbuf);
g_free(context);
g_free(ctx->hdr);
if (ctx->cmap)
g_free(ctx->cmap);
- gdk_pixbuf_unref(ctx->pbuf);
+ g_object_unref(ctx->pbuf);
if (ctx->in->size)
ctx->in = io_buffer_free_segment(ctx->in, ctx->in->size, err);
if (!ctx->in) {
n = count = 0;
for (; n < pbuf->width * pbuf->height;) {
if (!fread_check(&tag, 1, 1, f, err)) {
- gdk_pixbuf_unref(pbuf);
+ g_object_unref(pbuf);
return NULL;
}
if (tag & 0x80) {
count = (tag & 0x7f) + 1;
n += count;
if (!fread_check(&color, 1, 1, f, err)) {
- gdk_pixbuf_unref(pbuf);
+ g_object_unref(pbuf);
return NULL;
}
for (; count; count--) {
n += count;
for (; count; count--) {
if (!fread_check(&color, 1, 1, f, err)) {
- gdk_pixbuf_unref(pbuf);
+ g_object_unref(pbuf);
return NULL;
}
*p++ = cmap->cols[color].r;
} else {
for (n = 0; n < pbuf->width * pbuf->height; n++) {
if (!fread_check(&color, 1, 1, f, err)) {
- gdk_pixbuf_unref(pbuf);
+ g_object_unref(pbuf);
return NULL;
}
*p++ = cmap->cols[color].r;
n = count = 0;
for (; n < pbuf->width * pbuf->height;) {
if (!fread_check(&tag, 1, 1, f, err)) {
- gdk_pixbuf_unref(pbuf);
+ g_object_unref(pbuf);
return NULL;
}
if (tag & 0x80) {
count = (tag & 0x7f) + 1;
n += count;
if (!fread_check(&pixel, pbuf->n_channels, 1, f, err)) {
- gdk_pixbuf_unref(pbuf);
+ g_object_unref(pbuf);
return NULL;
}
for (; count; count--) {
count = tag + 1;
n += count;
if (!fread_check(p, pbuf->n_channels * count, 1, f, err)) {
- gdk_pixbuf_unref(pbuf);
+ g_object_unref(pbuf);
return NULL;
}
p += pbuf->n_channels * count;
}
} else {
if (!fread_check(p, pbuf->rowstride * pbuf->height, 1, f, err)) {
- gdk_pixbuf_unref(pbuf);
+ g_object_unref(pbuf);
return NULL;
}
}
n = count = 0;
for (; n < pbuf->width * pbuf->height;) {
if (!fread_check(&tag, 1, 1, f, err)) {
- gdk_pixbuf_unref(pbuf);
+ g_object_unref(pbuf);
return NULL;
}
if (tag & 0x80) {
count = (tag & 0x7f) + 1;
n += count;
if (!fread_check(&color, 1, 1, f, err)) {
- gdk_pixbuf_unref(pbuf);
+ g_object_unref(pbuf);
return NULL;
}
for (; count; count--) {
n += count;
for (; count; count--) {
if (!fread_check(&color, 1, 1, f, err)) {
- gdk_pixbuf_unref(pbuf);
+ g_object_unref(pbuf);
return NULL;
}
p[0] = p[1] = p[2] = color;
} else {
for (n = 0; n < pbuf->width * pbuf->height; n++) {
if (!fread_check(&color, 1, 1, f, err)) {
- gdk_pixbuf_unref(pbuf);
+ g_object_unref(pbuf);
return NULL;
}
p[0] = p[1] = p[2] = color;
pixbuf = tiff_image_parse (tiff, context, error);
if (pixbuf)
- g_object_unref (G_OBJECT (pixbuf));
+ g_object_unref (pixbuf);
retval = pixbuf != NULL;
TIFFClose (tiff);
if (global_error)
}
if (State->pixbuf != NULL)
- gdk_pixbuf_ref(State->pixbuf);
+ g_object_ref(State->pixbuf);
pb = State->pixbuf;
g_return_val_if_fail(context != NULL, TRUE);
if (context->pixbuf)
- gdk_pixbuf_unref(context->pixbuf);
+ g_object_unref(context->pixbuf);
g_free(context);
if (context) {
(* context->update_func) (pixbuf, 0, 0, w, h, context->user_data);
- gdk_pixbuf_unref (pixbuf);
+ g_object_unref (pixbuf);
pixbuf = NULL;
}
color_name = xpm_extract_color (buffer);
- if ((color_name == NULL) || (g_strcasecmp (color_name, "None") == 0)
+ if ((color_name == NULL) || (g_ascii_strcasecmp (color_name, "None") == 0)
|| (parse_color (color_name, color) == FALSE)) {
color->transparent = TRUE;
color->red = 0;
NULL,
context->user_data);
(* context->update_func) (pixbuf, 0, 0, pixbuf->width, pixbuf->height, context->user_data);
- gdk_pixbuf_unref (pixbuf);
+ g_object_unref (pixbuf);
retval = TRUE;
}
-I$(top_srcdir) -I$(top_builddir) \
@GTK_DEBUG_FLAGS@ \
@GDK_PIXBUF_DEP_CFLAGS@ \
+ -DG_DISABLE_DEPRECATED \
+ -DGDK_PIXBUF_DISABLE_DEPRECATED \
@STRIP_END@
noinst_PROGRAMS = timescale
+ 16 * gdk_pixbuf_get_n_channels (destination_pixbuf),
destination_alpha);
- gdk_pixbuf_unref (source_pixbuf);
- gdk_pixbuf_unref (destination_pixbuf);
+ g_object_unref (source_pixbuf);
+ g_object_unref (destination_pixbuf);
if (result_pixel != expected_result) {
char *interpolation_type, *source_string, *destination_string, *result_string, *expected_string;
err = NULL;
did_fail = TRUE;
}
- g_object_unref (G_OBJECT (loader));
+ g_object_unref (loader);
if (data_is_ok == did_fail)
return FALSE;
} while (!did_fail);
for (i = loaders; i != NULL; i = i->next)
- g_object_unref (G_OBJECT (i->data));
+ g_object_unref (i->data);
g_list_free (loaders);
}
err = NULL;
}
- g_object_unref (G_OBJECT (loader));
+ g_object_unref (loader);
}
}